/**
 * @author wangyibo
 * @description 对路由的配置
 */
// 引入页面组件
import Login from "../views/login";
import Home from "../views/home";
import NotFound from "../views/common/NotFound";
import Setting from '../views/setting'
import Pro from "../views/project"
import ProEidt from '../views/project/Edit'
import Pucharts from '../views/pucharts'
import PuchartsEdit from '../views/pucharts/Edit'
import ProDetail from '../views/pucharts/detail'
// 引入页面的子组件路由
// import Boss from "../views/home/boss";
// import YuanGong from "../views/home/yuangong";
const Router = {
  // 模式配置  history  和 hash 模式
  mode: "history",
  // 配置路由
  routes: [
    { path: "/", redirect: "/login", meta: { notLogin: false } },
    // layout  布局
    { path: "/login", component: Login, meta: { notLogin: true,layout:'blank-layout' } },
    {
      path: "/home",
      component: Home,
      meta: { notLogin: false,title:"玄机科技短得要命" ,home:false},
      // 因为是子组件所以不需要加/了
      // children: [
      //   // { path: "", redirect: "yuangong" },//针对history
      //   // { path: "/", redirect: "yuangong" }, //针对hash
      //   { path: "yuangong", component: YuanGong },
      //   { path: "boss", component: Boss },
      // ],
    },
    { path: "/setting", component: Setting, meta: { notLogin: false,} },
    { path: "/project/list", component: Pro, meta: { notLogin: false,} },
    { path: "/project/edit",name: "editProject",component: ProEidt, meta: { notLogin: false,} },
    { path: "/pucharts/list", component: Pucharts, meta: { notLogin: false,} },
    { path: "/pucharts/edit",name:'editPuc', component: PuchartsEdit, meta: { notLogin: false,} },
    { path: "/pucharts/detail",name:'detailPuc', component: ProDetail, meta: { notLogin: false,} },
    { path: "*", component: NotFound, meta: { notLogin: false }},
  ],
};
export default Router;
